package com.jdd.modules.parking.util;

import org.apache.commons.lang3.StringUtils;

/**
 * @author liuyaowen
 * @Description: ip地址校验工具
 * @Date: 2021-04-08
 */
public class IpAddressCheckUtil {
    public static boolean checkPlateNo(String ipAddress) {
        if (StringUtils.isEmpty(ipAddress)) {
            return false;
        }
        String ipAddressMatch = "^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$";
        return ipAddress.matches(ipAddressMatch);
    }
}
